package Switch;

use strict;
use Data::Dumper;
use base qw (NetworkDB);

use Plug;

__PACKAGE__->set_up_table('switches');
__PACKAGE__->has_many(plugs => 'Plug');
__PACKAGE__->has_a(stackid => 'Stack');
__PACKAGE__->has_a(switch_typeid => 'SwitchType');

sub initialize {

}

sub Port2Plug {
	my $self = shift;
	my $port_no = shift;
	foreach ($self->plugs) {
		if ($port_no == $_->port) {
			return $_;
		}
	}
}

sub dump2line {
	my $self = shift;
}


1;

